class Solution:
    def getMaximumConsecutive(self, coins: list) -> int:
        coins.sort()
        cur = 0
        for i in range(len(coins)):
            minVal = coins[i]
            maxVal = coins[i] + cur
            if minVal <= cur + 1:
                cur = maxVal
            else:
                break
        return cur + 1
